Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 12 - Preview Components / Preview Components Reference
Functions / Displaying Previews


PreviewShowData

The PreviewShowData function allows you to display a preview if your preview component does not handle events.

pascal ComponentResult PreviewShowData (pnotComponent p, 
                                          OSType dataType, 
                                          Handle data, 
                                          const Rect *inHere);
p
Specifies your preview component. You obtain this identifier from
the Component Manager's OpenComponent function. See the chapter "Component Manager" in Inside Macintosh: More Macintosh Toolbox for details.
dataType
Contains the type of handle pointing to the data to be displayed in the preview.
data
Contains a handle to the data, which is typically the same as the subtype of your preview component.
inHere
Contains a pointer to a rectangle that defines the area into which you draw the preview. The current port is set to the correct graphics port
for drawing. You must not draw outside the given rectangle.
DESCRIPTION
If your preview component can display the data for the preview quickly enough that it does not need a cache (that is, you have set the pnotComponentNeedsNoCache flag), you should consider the PreviewShowData function an initialization function. Therefore, you should remember the location of the preview rectangle and set up any necessary data structures. An update event is generated after this function for your initial drawing. In this case, the type of the handle in the data parameter is an alias (that is, it is the rAliasType resource type), and the handle contains an alias to the file to be previewed.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help